﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;

namespace Pst_Backup_2013
{
    public partial class PstBackupAddinRibbon
    {
        private static Pst_Backup_Agent.FrmPstBackupAgent _frmSettings;

        private void PstBackupAddinRibbon_Load(object sender, RibbonUIEventArgs e)
        {

        }

        private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            Utilities.UpdateRegistryEntries();

            if (_frmSettings == null || _frmSettings.IsDisposed)
            {
                _frmSettings = new Pst_Backup_Agent.FrmPstBackupAgent();
                _frmSettings.Show();
            }
            else
                _frmSettings.BringToFront();
        }
    }
}
